import { Nodes } from '@knno/dom';
import { loading, loadingDot } from '../components/loading/loading';
import { JSXProps } from '@knno/dom/jsx';
import { AttrCheck, jsxBuild } from './utils';

export type UILoading = Nodes;

type LoadingProps = JSXProps<UILoading>;

const ATTRS: AttrCheck = {};

export function Loading(props: LoadingProps, children: Nodes[]): UILoading {
	return jsxBuild(loading(), props, children, ATTRS);
}

export function LoadingDot(props: LoadingProps, children: Nodes[]): UILoading {
	return jsxBuild(loadingDot(), props, children, ATTRS);
}
